package cn.zyjw.service.impl;

import cn.zyjw.domain.UserAuthAuditRecord;
import cn.zyjw.mapper.UserAuthAuditRecordMapper;
import cn.zyjw.service.UserAuthAuditRecordService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class UserAuthAuditRecordServiceImpl extends ServiceImpl<UserAuthAuditRecordMapper, UserAuthAuditRecord> implements UserAuthAuditRecordService{

    @Override
    public List<UserAuthAuditRecord> getUserAuthAuditRecordList(Long id) {
        return this.baseMapper.selectList(
                new LambdaQueryWrapper<UserAuthAuditRecord>()
                .eq(UserAuthAuditRecord::getUserId,id)
                .orderByDesc(UserAuthAuditRecord::getCreated)
        );
    }
}
